import httpInstance from "@/utils/http";



/**
 * 加入购物车
 * @param {*} id 
 * @param {*} num 
 * @returns 
 */
export const addCartApi = (skuId,count) => {
    return httpInstance({
        url: '/member/cart',
        method: 'POST',
        data: {
            skuId,
            count
        }
    })
}

/**
 * 获取购物车列表
 * @returns 
 */
export const getCartListApi = () => {
    return httpInstance({
        url: '/member/cart',
        method: 'GET'
    })
}

export const deleteCartApi = (ids) => {
    return httpInstance({
        url: '/member/cart',
        method: 'DELETE',
        data: {
            ids: ids
        }
    })
}
    